define([
		"jQuery",
		"Underscore",
		"Backbone",
		"js/model/BlogPostModel",
		"js/model/BlogAsideModel",
		"js/view/BlogPostView",
		"js/view/BlogAsideView"
	], function(
		$,
		_,
		Backbone,
		BlogPostModel,
		BlogAsideModel,
		BlogPostView,
		BlogAsideView
	) {

	var blogContentTemplate = "<div class=\"blogContent\"></div>";

	return Backbone.View.extend({
		tagName: "div",

		initialize: function() {
			console.log("BlogView - Initialize");

			this.$blogContent = $(blogContentTemplate);

			this.blogPostModel = new BlogPostModel();
			this.blogAsideModel = new BlogAsideModel();

			this.blogPostView = new BlogPostView({
				model: this.blogPostModel,
				name: this.options.name
			});
			this.blogAsideView = new BlogAsideView({
				model: this.blogAsideModel
			});
		},

		render: function() {
			console.log("BlogView - Render");
			
			this.$el.empty();
			this.$el.append(this.$blogContent.append(this.blogPostView.render().el));
			this.$el.append(this.blogAsideView.render().el);
			
			return this;
		}
	});
});